package com.cwb.generator.handler.impl;

import com.cwb.generator.config.Configuration;
import com.cwb.generator.handler.BaseHandler;
import com.cwb.generator.model.VueInfo;

import java.io.File;

public class VueHandler extends BaseHandler<VueInfo> {

    public VueHandler(String ftlName, VueInfo info) {
        this.ftlName = ftlName;
        this.info = info;
        this.savePath = Configuration.getString("base.baseDir")
                + File.separator + Configuration.getString("vue.path")
                + File.separator + info.getClassName() + ".vue";
        
    }
    
    @Override
    public void combineParams(VueInfo vueInfo) {
        this.param.put("entityInfo", vueInfo.getEntityInfo());
        this.param.put("className", vueInfo.getClassName());
    }
}
